package yunquan.wang.modules.base.web;

import javax.annotation.Resource;
import javax.validation.Valid;

import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import yunquan.wang.base.service.BaseService;
import yunquan.wang.base.web.BaseController;
import yunquan.wang.modules.base.entity.RulesInfo;
import yunquan.wang.modules.base.service.RulesInfoService;
/**
 * RulesInfo 页面控制器
 * @author 王云权   wangyunquan@gmail.com
 *  用生成器 生成于 2011-09-30 22:37
 *
 */
@Controller
@RequestMapping("/core/rulesinfo")
public class RulesInfoController extends BaseController<RulesInfo> {
	@Resource(name="rulesInfoService")
	private RulesInfoService rulesInfoService;
	public void setRulesInfoService(RulesInfoService rulesInfoService) {
		this.rulesInfoService = rulesInfoService;
	}

	@Override
	public BaseService<RulesInfo> getService() {
		return rulesInfoService;
	}
   /*
    *默认列表显示和排序搜索查找
    */
	@RequestMapping(value = "/list.do")
	public ModelAndView list() {
		return baseList();
	}
  	/*
    *默认保存方法
    */
	@RequestMapping(value = "/save.do")
	public ModelAndView save(@Valid RulesInfo entity,
			BindingResult bindingResult) {
		return baseSave(entity,bindingResult);
	}
	/*
    *默认查看
    */
	@RequestMapping(value = "/view.do")
	public ModelAndView view() {
		return baseView();
	}
	/*
    *默认输入方法
    */
	@RequestMapping(value = "/input.do")
	protected ModelAndView input(String id) {
		return baseInput();
	}
	/*
    *默认删除方法
    */
	@RequestMapping(value = "/delete.do")
	protected ModelAndView delete() {
		return baseDelete();
	}

}
